//file TAPI.js
//==================================================================================================
//    TAPI class
function TAPI(parentId)
{
    var head = document.getElementsByTagName('head')[0];
    var jquery = document.createElement('script');
    jquery.type='text/javascript';
    jquery.src='http://betadesktop.tapnmap.ru/js/jquery/js/jquery-1.7.1.min.js';
    head.appendChild(jquery);
    var jquery_wheel = document.createElement('script');
    jquery_wheel.type='text/javascript';
    jquery_wheel.src='http://betadesktop.tapnmap.ru/js/jquery/js/jquery.mousewheel.min.js'
    head.appendChild(jquery_wheel);
    var ttooltip = document.createElement('script');
    ttooltip.type = 'text/javascript';
    ttooltip.src = src='http://betadesktop.tapnmap.ru/js/TToolTip.js';
    head.appendChild(ttooltip);
    var tplanengine = document.createElement('script');
    tplanengine.type = 'text/javascript';
    tplanengine.src = 'http://betadesktop.tapnmap.ru/js/TPlanEngine.js';
    head.appendChild(tplanengine);
    this.setPlan = function(str){
        var script = "var tpe = new TPlanEngine('"+parentId+"');"
        script += "tpe.setUpPlanFromText('"+str+"');";
        eval(script);
    }
}
//==================================================================================================
